    /***
     * @description axios封装
     * @file api.ts
     * @author andy
     * @date 2024/3/22 16:40
     */
// file:api.s
// 1、导入axios以及拦截器
import service from './request'

// demo接口1
export const demo1 = (data:any) => {
    return service({
        url: '/user/user/demo1/' + data,
        method: 'post'
    })
};


// demo接口2
export const demo2 = (data:any) => {
    return service({
        url: '/user/user/demo2',
        method: 'post',
        data
    })
};

// 登录
export const login = (data:any) => {
    return service({
        url: '/user/index/login',
        method: 'post',
        data
    })
};

// 用户注册
export const addUser = (data:any) => {
    return service({
        url: '/user/index/addUser',
        method: 'post',
        data
    })
};

// 用户列表
export const getUserPage = (data:any) => {
    return service({
        url: '/user/index/getUserPage',
        method: 'post',
        data
    })
};

// 用户审核
export const checkUser = (data:any) => {
    return service({
        url: '/user/index/checkUser',
        method: 'post',
        data
    })
};

// 根据用户id获取用户信息
export const getUserByUserId = (userId:any) => {
    return service({
        url: '/user/index/getUserByUserId/' + userId,
        method: 'post'
    })
};

// 修改用户信息
export const updateUser = (data:any) => {
    return service({
        url: '/user/index/updateUser',
        method: 'post',
        data
    })
};

// 根据用户id获取用户信息
export const deleteByUserId = (userId:any) => {
    return service({
        url: '/user/index/deleteByUserId/' + userId,
        method: 'post'
    })
};

// 批量删除商户
export const deleteBatchUser = (data:any) => {
    return service({
        url: '/user/index/deleteBatch',
        method: 'post',
        data
    })
};

// 商品列表
export const getProdPage = (data:any) => {
    return service({
        url: '/prod/index/getProdPage',
        method: 'post',
        data
    })
};